(setq-default
 display-time-24hr-format t
 comment-style 'extra-line
 inhibit-startup-message t
 user-full-name "dimon"
 user-mail-address "buhtiyarov@effy.eu"
 hm--html-automatic-changed-comment nil
 require-final-newline t
 scroll-margin 0
 hscroll-margin 0
 size-indication-mode t
 blink-cursor-mode t
 fringle-mode nil
 truncate-lines nil
 desktop-save-mode t
 c-ignore-auto-fill '(string)
 ispell-dictionary "russian"
 scroll-preserve-screen-position t
 scroll-margin 0
 scroll-conservatively 100000
 bookmark-default-file "~/.emacs.d/files/bookmarks" ;; keep my ~/ clean
 bookmark-save-flag 1                         ;; autosave each change)
 tetris-score-file "~/.emacs.d/files/games/tetris-scores"
 angle-ftp-try-passive-mode t
 x-select-enable-clipboard t
 confirm-kill-emacs 'yes-or-no-p
 calendar-week-start-day 1
 inhibit-splash-screen t
 inhibit-startup-message t
 ;; show-trailing-whitespace t
 use-dialog-box nil
 )

(prefer-coding-system 'utf-8-unix)

(set-default-font "-xos4-terminus-medium-r-normal--14-*-72-72-c-80-koi8-r")

(add-hook 'before-save-hook 'time-stamp)
(fset 'yes-or-no-p 'y-or-n-p)
(add-to-list 'desktop-locals-to-save 'buffer-file-coding-system)

(setq bar-cursor 2)
;(savehist-mode 1)
;(iswitchb-mode t)
;(scroll-bar-mode nil)
(global-hl-line-mode t)
(setq menubar-visible-p nil)
(setq scrollbar-width 0)
(setq scrollbar-height 0)
;(set-face-attribute 'mode-line nil :box nil)
(set-fringe-style "none")

(require 'ange-ftp)
(ange-ftp-parse-netrc)

;(setq inhibit-startup-message   t)   ; Don't want any startup message
(setq make-backup-files         nil) ; Don't want any backup files
(setq auto-save-list-file-name  nil) ; Don't want any .saves files
(setq auto-save-default         nil) ; Don't want any auto saving

(require 'uniquify)
(setq 
  uniquify-buffer-name-style 'reverse
  uniquify-separator ":")
;; (setq uniquify-buffer-name-style 'reverse)
;; (setq uniquify-separator "/")
;; (setq uniquify-after-kill-buffer-p t) ; rename after killing uniquified
;; (setq uniquify-ignore-buffers-re "^\\*") ; don't muck with special buffers



;(require 'dsvn)

;(set-background-color "black")
;(setq-default truncate-lines nil)
;(setq-default truncate-partial-width-windows nil)
;(setq-default c-syntactic-indentation nil)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
(setq-default auto-save-default nil)
(setq-default make-backup-files nil)
(setq kill-whole-line 'always)
(setq css-indent-offset 2)
(c-set-offset 'case-label 2)
(c-set-offset 'arglist-close 0)
(c-set-offset 'arglist-intro 2)
;(auto-fill-mode t)

;(add-hook 'c-mode-common-hook 'turn-on-auto-fill)
;(add-hook 'c-mode-common-hook '(lambda () (flyspell-mode 1)))

(global-set-key "\C-c\C-f" 'auto-fill-mode); вкл/выкл автозаполнения
(global-set-key "\C-c\C-s" 'flyspell-mode); вкл/выкл проверки орфографии "на ходу"
(global-set-key "\C-c\C-b" 'ispell-buffer); проверить орфографию в текущем буфере
(global-set-key [(f1)] (lambda () (interactive)  (manual-entry  (current-word))));; вызывает man-page по слову в позиции курсора

(defun nuke-all-buffers ()
  "kill all buffers, leaving *scratch* only"
  (interactive)
  (mapcar (lambda (x) (kill-buffer x))
	  (buffer-list))
  (delete-other-windows))

(defun insert-date (prefix)
    "Insert the current date. With prefix-argument, use ISO format. With
   two prefix arguments, write out the day and month name."
    (interactive "P")
    (let ((format (cond
                   ((not prefix) "%d.%m.%Y")
                   ((equal prefix '(4)) "%Y-%m-%d")
                   ((equal prefix '(16)) "%A, %d. %B %Y")))
          (system-time-locale "de_DE"))
	        (insert (format-time-string format))))
(global-set-key (kbd "C-c d") 'insert-date)
(global-set-key (kbd "C-c f") 'fill-region)

(defun google (what)
  "Use google to search for WHAT."
  (interactive "sSearch: ")
  (w3m-browse-url (concat "http://google.com.ua/search?q="
                          (w3m-url-encode-string what))))

(defun drupal (what)
  "Drupal api for functin."
  (interactive "sFunction: ")
  (w3m-browse-url (concat "http://api.drupal.org/api/function/"
                          (w3m-url-encode-string what))))

(defun php (what)
  "PHP help for functin."
  (interactive "sFunction: ")
  (w3m-browse-url (concat "http://ua.php.net/"
                          (w3m-url-encode-string what))))

;; (global-set-key 'f1 'find-file) ;; C-x C-f
;; ;; (global-set-key 'f2 'save-buffer) ;; C-x C-s
;; ;; (global-set-key 'f3 'advertised-undo) ;; Undo
;; ;; ;(global-set-key 'f5 'copy-primary-selection) ;; Copy
;; ;; (global-set-key 'f5 'font-lock-fontify-buffer) ;; Copy
;; ;; (global-set-key 'f6 'yank-clipboard-selection) ;; Paste
;; ;; (global-set-key 'f8 'kill-primary-selection) ;; Cut

(global-set-key (kbd "s-=") `enlarge-window)
(global-set-key (kbd "s--") `shrink-window)
(global-set-key (kbd "s-9") `shrink-window-horizontally)
(global-set-key (kbd "s-0") `enlarge-window-horizontally)

(global-set-key (kbd "s-n") `next-multiframe-window)
(global-set-key (kbd "s-p") `previous-multiframe-window)

(global-set-key (kbd "s-f") `switch-to-next-buffer)
(global-set-key (kbd "s-b") `switch-to-previous-buffer)
(global-set-key (kbd "s-o") `switch-to-other-buffer)
(global-set-key (kbd "s-k") `kill-buffer)

(global-set-key [C-tab] 'complete-symbol)

;; (add-to-list 'load-path "/usr/local/share/emacs/site-lisp")

;; (mmm-add-group
;;  'fancy-html
;;  '(
;;          (html-php-tagged
;;                 :submode php-mode
;;                 :face mmm-code-submode-face
;;                 :front "<\\?php"
;;                 :back "\\?>"
;;                 )
;;          (html-css-attribute
;;                 :submode css-mode
;;                 :face mmm-declaration-submode-face
;;                 :front "style=\\\""
;;                 :back "\\\""
;;                 )
;;          )
;;  )
 
;; (add-to-list 'auto-mode-alist '("\\.inc\\'" . html-mode))
;; (add-to-list 'auto-mode-alist '("\\.phtml\\'" . html-mode))
;; (add-to-list 'auto-mode-alist '("\\.php[34]?\\'" . html-mode))
;; (add-to-list 'auto-mode-alist '("\\.[sj]?html?\\'" . html-mode))
;; (add-to-list 'auto-mode-alist '("\\.jsp\\'" . html-mode))

;; (add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil html-js))
;; (add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil embedded-css))
;; (add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil fancy-html))

;; (defun emacs-uptime ()
;;   "Shows emacs-uptime."
;;   (interactive)
;;   (message (format "Emacs-uptime is %d days." (random 100))))

;; Первая функция меняет кодировку рид-онли буфера, а вторая - обычного. Очень удобно.
;; Использовать - M-x recode-buffer-safe (я себе сделал алиас - charset)

(defun recode-buffer-dangerous (target-coding-system)
  "* Recode buffer as if it were encoded with `target-coding-system'.
  If current buffer is write-protected (`buffer-read-only'), temporarily toggle
  read-only flag, recode, then turn it back."
  (interactive "zEnter target coding system: ")
  (labels ((do-recode nil
                      (encode-coding-region (point-min)
                                            (point-max)
                                            buffer-file-coding-system)
                      (decode-coding-region (point-min)
                                            (point-max)
                                            target-coding-system)
                      (set-buffer-file-coding-system target-coding-system)))
    (if buffer-read-only
        (let ((buffer-read-only nil))
          (do-recode)
          (set-buffer-modified-p nil))
      (do-recode))))

(defun recode-buffer-safe (target-coding-system)
  "* Recode buffer as if it were encoded with `target-coding-system'.
  If current buffer is write-protected (`buffer-read-only'), do nothing."
  (interactive "zEnter target coding system: ")
  (unless buffer-read-only
    (encode-coding-region (point-min)
                          (point-max)
                          buffer-file-coding-system)
    (decode-coding-region (point-min)
                          (point-max)
                          target-coding-system)
    (set-buffer-file-coding-system target-coding-system))) 


;; gmail!
;; (add-to-list 'gnus-secondary-select-methods '(nnimap "gmail"
;;                                   (nnimap-address "imap.gmail.com")
;;                                   (nnimap-server-port 993)
;;                                   (nnimap-stream ssl)))

;; (setq message-send-mail-function 'smtpmail-send-it
;;       smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
;;       smtpmail-auth-credentials '(("smtp.gmail.com" 587 "buhtiyarov@effy.eu" nil))
;;       smtpmail-default-smtp-server "smtp.gmail.com"
;;       smtpmail-smtp-server "smtp.gmail.com"
;;       smtpmail-smtp-service 587
;;       smtpmail-local-domain "effy.eu")

;; (load "~/.emacs.d/windata.el")
;; (load "~/.emacs.d/tree-mode.el")
;; (load "~/.emacs.d/php-doc.el")
;; (require 'php-doc nil t)
;; (setq php-doc-directory "/home/dimon/.emacs.d/php-manual")
;; (add-hook 'php-mode-hook
;;           (lambda ()
;;             (local-set-key "\t" 'php-doc-complete-function)
;;             (local-set-key (kbd "\C-c h") 'php-doc)
;;             (set (make-local-variable 'eldoc-documentation-function)
;;                  'php-doc-eldoc-function)
;;             (eldoc-mode 1)))

; (add-to-list 'load-path "~/.emacs.d/efs")


;(add-to-list 'load-path "~/.emacs.d/elim/elisp")

(add-to-list 'load-path "~/.emacs.d/libs")
;(require 'linum)
;(add-hook 'c-mode-common-hook '(lambda() (linum-mode 1)))

(defun djcb-zoom (n)
  "with positive N, increase the font size, otherwise decrease it"
  (set-face-attribute 'default (selected-frame) :height 
    (+ (face-attribute 'default :height) (* (if (> n 0) 1 -1) 10))))
;(global-set-key (kbd "C-+")      '(lambda nil (interactive) (djcb-zoom 1)))
;(global-set-key [C-kp-add]       '(lambda nil (interactive) (djcb-zoom 1)))
;(global-set-key (kbd "C--")      '(lambda nil (interactive) (djcb-zoom -1)))
;(global-set-key [C-kp-subtract]  '(lambda nil (interactive) (djcb-zoom -1)))

(defun djcb-full-screen-toggle ()
  "toggle full-screen mode"
  (interactive)
  (shell-command "wmctrl -r :ACTIVE: -btoggle,fullscreen"))

(global-set-key (kbd "<f11>")  'djcb-full-screen-toggle)

(add-hook 'c-mode-common-hook
          (lambda ()
            (font-lock-add-keywords nil
                 '(("\\<\\(FIXME\\|TODO\\|BUG\\):" 1 font-lock-warning-face t)))))

;; (font-lock-add-keywords 'php-mode
;;   '(("[^_\\(]?\\<\\(NYA\\)\\>[^_\\(\\)]?" . font-lock-constant-face)))

;; (add-hook 'c-mode-common-hook
;;   (lambda ()
;;     (font-lock-add-keywords nil
;;       '(("^[^\n]\\{80\\}\\(.*\\)$" 1 font-lock-warning-face t)))))


(defun get-ip-address (&optional dev)
  "get the IP-address for device DEV (default: eth0)"
  (let ((dev (if dev dev "dsl0"))) 
    (format-network-address (car (network-interface-info dev)) t)))

(defun nya ()
  "Nya! ^_^"
  (interactive)
  (message "Nya! ^_^"))

;; ido makes completing buffers and ffinding files easier
;; http://www.emacswiki.org/cgi-bin/wiki/InteractivelyDoThings
;; (require 'ido) 
;; (ido-mode t) ; for buffers and files
;; (setq 
;;   ido-ignore-buffers ;; ignore these guys
;;   '("\\` " "^\*Mess" "^\*Back" ".*Completion" "^\*Ido")
;;   ido-work-directory-list '("~/" "~/public_html" "~/themes")
;;   ido-everywhere t                 ; use for many file dialogs
;;   ido-case-fold  t                 ; be case-insensitive
;;   ido-enable-last-directory-history t ; remember last used dirs
;;   ido-max-work-directory-list 30   ; should be enough
;;   ido-max-work-file-list      50   ; remember many
;;   ido-use-filename-at-point nil    ; don't use filename at point (annoying)
;;   ido-use-url-at-point nil         ;  don't use url at point (annoying)
;;   ido-enable-flex-matching t       ; be flexible
;;   ido-max-prospects 4              ; don't spam my minibuffer
;;   ido-confirm-unique-completion t) ; wait for RET, even with unique completion

(add-hook 'c-mode-common-hook
  (lambda ()
    (require 'doxymacs)
    (doxymacs-mode t)
    (doxymacs-font-lock)))

;; (add-hook 'php-mode-hook
;;   '(lambda () (define-abbrev php-mode-abbrev-table "ex" "extends")))

(defun insert-file-header() "Inserts the file header"
  (interactive)  
  (insert "/*\n")
  (insert " * .cs\n")
  (insert (concat " * Copyright (C) " (format-time-string "%Y")  ", " user-full-name ". All Rights Reserved.\n"))
  (insert " *\n")
  (insert " * Description :\n")
  (insert " *   \n")
  (insert " *\n")
  (insert " * Author(s):\n")
  (insert (concat " *   " user-full-name " <" user-mail-address ">\n"))
  (insert " *\n")
  (insert (concat " * This is UNPUBLISHED PROPRIETARY SOURCE CODE of " user-full-name  ".\n"))
  (insert " * The contents of this file may not be disclosed to third parties, copied or\n")
  (insert " * duplicated in any form, in whole or in part, without the prior written\n")
  (insert (concat " * permission of " user-full-name ".\n"))
  (insert " */\n")
  (previous-line 13)
  (backward-char 4))


;; .gnu-emacs-custom
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(column-number-mode t)
 '(delete-selection-mode nil)
 '(display-time-mode t)
 '(gutter-buffers-tab-visible-p nil)
 '(menu-bar-mode nil)
 '(php-completion-file "~/.emacs.d/files/php-completion-file")
 ;'(save-place t nil (saveplace))
 '(scroll-bar-mode (quote right))
 '(show-paren-mode t)
 '(size-indication-mode t)
 '(tool-bar-mode nil)
 '(toolbar-visible-p nil)
 '(transient-mark-mode t))

(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(font-lock-builtin-face ((((class color) (min-colors 88) (background light)) (:foreground "#5F9EA0"))))
 '(font-lock-comment-face ((((class color) (min-colors 88) (background light)) (:foreground "#AAAAAA"))))
 '(font-lock-function-name-face ((((class color) (min-colors 88) (background light)) (:foreground "#8B2323"))))
 '(font-lock-keyword-face ((((class color) (min-colors 88) (background light)) (:foreground "#0000FF"))))
 '(font-lock-string-face ((((class color) (min-colors 88) (background light)) (:foreground "#008B00"))))
 '(font-lock-variable-name-face ((((class color) (min-colors 88) (background light)) (:foreground "#8B008B"))))
 '(font-lock-warning-face ((((class color) (min-colors 88) (background light)) (:foreground "#000000"))))
 '(highlight ((((class color) (min-colors 88) (background light)) (:background "#F2F2F2"))))
 '(nxml-comment-content-face ((t :inherit font-lock-comment-face)))
 '(nxml-comment-delimiter-face ((t :inherit font-lock-comment-face))))

(defun drupal-mode ()
  ;(interactive)
  ;(php-mode)
  ;(setq c-basic-offset 2)
  ;(setq indent-tabs-mode nil)
  (setq fill-column 78)
  (c-set-offset 'case-label 2)
  (c-set-offset 'arglist-close 0)
  (c-set-offset 'arglist-intro 2)
  )

(defun drupal-module-name ()
  "Return name of module"
  (car (split-string (buffer-name) "\\.")))

(defun drupal-hook-insert (name)
  "Insert template for a drupal hook"
  (interactive "MEnter hook name:")
  (insert (concat "/**\n* Implementation of hook_" name "().\n*/\nfunction " (drupal-module-name) "_" name "() {\n\n}\n")))

(defun drupal-form-insert (name)
  "Insert templat for a drupal form"
  (interactive "MEnter form name:")
  (insert (concat "/**\n * Form builder for .\n */\nfunction " (drupal-module-name) "_" name "($form_state) {\n\n}\n"))
  (insert (concat "\n\n/**\n * Form validation handler for " (drupal-module-name) "_" name "().\n */\nfunction " (drupal-module-name) "_" name "_validate($form, &$form_state) {\n\n}"))
  (insert (concat "\n\n/**\n * Form submission handler for " (drupal-module-name) "_" name "().\n */\nfunction " (drupal-module-name) "_" name "_submit($form, &$form_state) {\n\n}")))

;; (global-set-key (kbd "C-c d h") 'drupal-hook-insert)
;; (global-set-key (kbd "C-c d f") 'drupal-form-insert)

(defun my-c-mode-hook ()
  (c-set-style "cc-mode")
  (setq c-syntactic-indentation t)
  ;(c-toggle-auto-state)
  ;(c-toggle-auto-hungry-state)
  (setq c-basic-offset 2)
  ;(set-face-background 'modeline "#D3D3D3" (current-buffer))
  (turn-on-font-lock)
  (drupal-mode)
  ;; (c-toggle-electric-state nil)
  ;; (c-toggle-auto-newline nil)
  ;comment-start "// "
  ;comment-end ""
  (setq truncate-lines nil)
  (toggle-truncate-lines nil)
  )

(defun my-javascript-mode-hook ()
  (c-set-style "cc-mode")
  (setq c-syntactic-indentation nil)
  ;(c-toggle-auto-state)
  ;(c-toggle-auto-hungry-state)
  (setq c-basic-offset 2)
  ;(set-face-background 'modeline "#D3D3D3" (current-buffer))
  (turn-on-font-lock)
  )

;;(my-c-mode-hook)

(add-hook 'c-mode-hook 'my-c-mode-hook)
(add-hook 'c++-mode-hook 'my-c-mode-hook)
(add-hook 'javascript-mode-hook 'my-javascript-mode-hook)
(add-hook 'java-mode-hook 'my-c-mode-hook)

(add-hook 'php-mode-user-hook 'my-c-mode-hook)
(add-hook 'actionscript-mode-hook 'my-c-mode-hook)



;(set-background-color "black")
(setq-default truncate-lines nil)
(setq-default truncate-partial-width-windows nil)
;(setq-default c-syntactic-indentation nil)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
(setq-default auto-save-default nil)
(setq-default make-backup-files nil)

(setq-default
    display-time-24hr-format t
    comment-style 'extra-line
    inhibit-startup-message t
    ;user-full-name "buhtiyarov"
    hm--html-automatic-changed-comment nil
    )

(add-hook 'before-save-hook 'time-stamp)

;(setq inhibit-startup-message   t)   ; Don't want any startup message
(setq make-backup-files         nil) ; Don't want any backup files
(setq auto-save-list-file-name  nil) ; Don't want any .saves files
(setq auto-save-default         nil) ; Don't want any auto saving

(add-hook 'python-mode-user-hook 'turn-on-font-lock)
;(add-hook 'php-mode-user-hook '( indent-tab-mode nil))

(turn-on-font-lock)
;(global-font-lock-mode 1)
(display-time)
(setq mark-even-if-inactive t)

;(global-set-key [(tab)] 'smart-tab)
(defun smart-tab ()
  "This smart tab is minibuffer compliant: it acts as usual in
    the minibuffer. Else, if mark is active, indents region. Else if
    point is at the end of a symbol, expands it. Else indents the
    current line."
  (interactive)
  (if (minibufferp)
      (unless (minibuffer-complete)
        (dabbrev-expand nil))
    (if mark-active
        (indent-region (region-beginning)
                       (region-end))
      (if (looking-at "\\_>")
          (dabbrev-expand nil)
        (indent-for-tab-command)))))

(setq *HOME* "~")

(defun emacs-save-layout ();TODO: handle eshell
  "save the frame and window layout to ~/.emacs-layout. Requires revive.el."
(interactive)
(let ((out-name (concat *HOME* "/.emacs-layout"))
      (frames (frame-list))
      (configs nil)
      (buffs (sorted-buffer-list))
      (filtered-buffs nil)
      (s-buffs nil))
  (dolist (b buffs)    
      (let ((file-name (buffer-file-name b)))
        (when (and file-name
                   (> (length file-name) 0))
          (setq filtered-buffs (cons file-name filtered-buffs)))))
  (when filtered-buffs (setq filtered-buffs (reverse filtered-buffs)))
  (dolist (frame frames)
    (select-frame frame)
    (setq configs (cons (current-window-configuration-printable) configs)))
  (setq configs (cons filtered-buffs configs))
  (write-region (with-output-to-string (prin1 configs)) nil out-name)))

(defun emacs-load-layout ();TODO: handle eshell buffers.
  "Load the layout saved by emacs-save-layout. Requires revive.el."
(interactive)
(let* ((in-name (concat *HOME* "/.emacs-layout"))
      (config-count 0)
      (frames (frame-list))
      (configs nil)
      (frame-count (length frames))
      (buffs nil))
  (with-temp-buffer
    (insert-file-contents-literally in-name)
    (setq buffs (read (current-buffer)))
    (setq configs (rest buffs))
    (setq buffs (first buffs)))
  (dolist (b buffs)
    (find-file-noselect b)
    (message "Loading buffer %s" b))
  (setq config-count (length configs))
  (message "Config count is %s" config-count)
  (unless (>= frame-count config-count)
    (dotimes (i (- config-count frame-count))
      (make-frame))
    (setq frames (frame-list))
    (setq frame-count (length frames))
    (message "frame-count is %s" frame-count))
  (defun it (lconfigs lframes)
            (when (and lconfigs lframes)
              (select-frame (first lframes))
              (restore-window-configuration (first lconfigs))
              (it (rest lconfigs) (rest lframes))))
  (it configs frames)))

;(add-to-list 'load-path "~/.emacs.d/chess")
;(require 'chess)

;; (require 'restore-window-on-startrup)

(mapc 'load (directory-files "~/.emacs.d/conf.d/" t "\\.el$"))

(setq default-directory "~/")
(mouse-avoidance-mode 'animate)
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(setq frame-title-format "%b - %f")

(or (assoc "\\.html$" auto-mode-alist)
    (setq auto-mode-alist (cons '("\\.html$" . html-mode) 
		    auto-mode-alist)))

(or (assoc "\\.tpl$" auto-mode-alist)
    (setq auto-mode-alist (cons '("\\.tpl$" . html-mode) 
		    auto-mode-alist)))

(or (assoc "\\.tpl\\.php$" auto-mode-alist)
    (setq auto-mode-alist (cons '("\\.tpl\\.php$" . html-mode) 
		    auto-mode-alist)))

(or (assoc "\\.module$" auto-mode-alist)
    (setq auto-mode-alist (cons '("\\.module$" . php-mode) 
		    auto-mode-alist)))

(or (assoc "\\.install$" auto-mode-alist)
    (setq auto-mode-alist (cons '("\\.install$" . php-mode) 
		    auto-mode-alist)))

(or (assoc "\\.as$" auto-mode-alist)
    (setq auto-mode-alist (cons '("\\.as$" . actionscript-mode) 
		    auto-mode-alist)))

(add-to-list 'auto-mode-alist '("\\.info$" . conf-mode))
(add-to-list 'auto-mode-alist '("Doxyfile$" . conf-mode))
(add-to-list 'auto-mode-alist '("\\.htaccess$" . conf-mode))
(setq auto-mode-alist (cons '("\\.tpl\\.php$" . html-mode) auto-mode-alist))

(require 'autopair)
(autopair-global-mode t)

(add-to-list 'load-path "~/.emacs.d/skeletons")
(require 'drupal6)
(drupal6)
